import http from '@/utils/http'
import type { Login } from '../interface'
import { PORT1 } from '@/api/config/servicePort'

/**
 * @name 登录模块
 */
// 登录
export const loginApi = (params: Login.ReqLoginForm) => {
  return http.post<Login.ResLogin>(PORT1 + `/login`, params, { loading: false }) // 正常 post json 请求  ==>  application/json
}

// 获取菜单列表
export const getAuthMenuListApi = () => {
  return http.get<Menu.MenuOptions[]>(PORT1 + `/menu/list`, {}, { loading: false })
}
